const state = {
    historyList: [],
    num: 1
};
const getters = {

};
const mutations = {
    PUSTH_HISTORY(state, payload) {
        state.historyList.push(payload)
        this.commit('CHANGE_NUM')
    },
    CHANGE_NUM(state) {
        state.num++
    },
    CHANGE_HISTORY(state, { num, item }) {
        let inx = num - 1;
        state.historyList[inx] = item
        state.historyList = [...state.historyList]
    }
};
const actions = {
};

export default {
    namespace: true,
    state,
    getters,
    mutations,
    actions
}